<template>
  <router-view>
  </router-view>
</template>

<script>
(function ($) {
  $.fn.extend({
    "upImgSrc": function () {
      var _this = $(this)
      return _this.attr('src', picSrc + _this.attr('src'))
    }
  });
  $.fn.extend({
    "upAudioSrc": function () {
      var _this = $(this)
      return _this.attr('src', picSrc + _this.attr('src'))
    }
  });
  $.fn.extend({
    "upVideoSrc": function () {
      var _this = $(this)
      return _this.attr('src', picSrc + _this.attr('src'))
    }
  });
})(jQuery);



export default {
  name: "studentclient",
  mounted() {
    var _this = this, firstIntval = 0
    //console.log(_this.$store.state)
    firstIntval = setInterval(function () {
      if (_this.$store.state.token != '') {
        clearInterval(firstIntval);
        setInterval(function () {
          //每8分钟更新一次sk
          _this.$http.get(('api/auth/update?sk=' + _this.$store.state.token)).then(function (res) {
            _this.$store.commit('UPDATE_SK', { sk: res.data.data })//获取并保存SK
          })
        }, 48000)
      }
    }, 1000)
  }
}


</script>
